<%--
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is the StikiWeb Wiki 
 *
 * The Initial Developer of the Original Code is Lee Haslup (biglee@haslups.com).
 * Portions created by the Initial Developer are Copyright (C) 2004
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * ***** END LICENSE BLOCK ***** */
 * $Id: editPage.jsp,v 1.3 2004/05/05 05:38:27 biglee Exp $
--%> 
<%@ page language="java" contentType="text/html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html>
  <head>
  	<link rel='icon' href='images/logo1.png' type='image/png' />
  	<link rel='shortcut icon' href='images/logo1.png' type='image/png' />
    <title>
      Stiki Wiki - <bean:write name="page" property = "name" />
    </title>
  </head>
<body>
	<table width='100%'>
		<tr>
			<td width='10%'>
				<img src="images/logomed.png" alt="Stiki Wiki" />
			</td>
			<td>
				<h1>
					Stiki Wiki Page - <bean:write name="page" property = "name" />
				</h1>
			</td>
		</tr>
		<tr>
			<td valign='top' align='center'>
				<logic:notEmpty name="page" property="text">
					<br />
					<i>Preview<br />appears<br />below</i>
					<br />|<br />|<br />|<br />V
				</logic:notEmpty>
			</td>
			<td>
				<html:form action='/editPage.do' focus='newMarkup'>
					<html:hidden property='name' />
					<html:hidden property='operation' />
					<html:textarea property='newMarkup' cols='80' rows='15'>
						<bean:write name="page" property="newMarkup"  />
					</html:textarea>
					<br />
					<logic:equal value="CREATE" name="page" property="operation">
						<html:submit property="preview">
							  preview page
						  </html:submit>
						<html:submit property="save">
							  create page
						  </html:submit>
					</logic:equal>
					<logic:equal value="EDIT" name="page" property="operation">
						<html:submit property="preview">
							  preview changes
						  </html:submit>
						<html:submit property="save">
							  save changes
						  </html:submit>
					</logic:equal>
					<logic:equal value="COMMENT" name="page" property="operation">
						<html:submit property="preview">
							  preview comment
						  </html:submit>
						<html:submit property="save">
							  apply comment
						  </html:submit>
					</logic:equal>
					<html:submit property="cancel">
						  cancel
					  </html:submit>
				</html:form>
				<br />Preview:<hr />
				<bean:write name="page" property="text" filter="false" />
			</td>
		</tr>
	</table>
</body>
</html>